/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.seari.service.impl;

import com.seari.bean.UserPrivilege;
import com.seari.mapper.UserPrivilegeMapper;
import com.seari.pojo.QueryUserPrivilege;
import com.seari.service.UserPrivilegeService;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 *
 * @author Rainbow
 */
@Service("userPrivilegeService")
public class UserPrivilegeServiceImpl implements UserPrivilegeService
{
    @Autowired
    private UserPrivilegeMapper userPrivilegeMapper;
    
    @Override
    public List<UserPrivilege> getUserPrivilegeByParams(QueryUserPrivilege qup)
    {
        return userPrivilegeMapper.getUserPrivilegeByParams(qup);
    }

    @Override
    public int addUserPrivilege(UserPrivilege userPrivilege)
    {
        return  userPrivilegeMapper.addUserPrivilege(userPrivilege);
    }

    @Override
    public int checkUserPrivilegeExist(QueryUserPrivilege qup)
    {
        return userPrivilegeMapper.checkUserPrivilegeExist(qup);
    }

    @Override
    public int updateUserPrivilege(UserPrivilege userPrivilege)
    {
        return userPrivilegeMapper.updateUserPrivilege(userPrivilege);
    }

    @Override
    public int deleteUserPrivilege(int upid)
    {
        return userPrivilegeMapper.deleteUserPrivilege(upid);
    }
    
}
